<template>
	<view>
		<scroll-view scroll-y style="width: 100%;height: 70vh;padding: 10px;">
			<view style="width: 100%; ">
				<!-- <web-view :src="sConf.pics + '/media/docs/yhxy.md'"></web-view> -->
				<rich-text :nodes="strings" style="width: 100%;"></rich-text>
				<!-- button style="background-color: #000;color: #fff;margin-top: 20px;" @click="aggree">接受协议</button -->
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import utils from '@/common/utils';
	export default {
		name: "sub-secret-card",
		data() {
			return {
				title: '用户协议',
				sConf: getApp().globalData,
				strings: ''
			};
		},
		mounted() {
			this.showAuthorize()
		},
		props: {
			src: {
				type: String,
				default: null
			}
		},
		methods: {
			/**
			 * 用户协议
			 */
			showAuthorize() {
				let host = this.sConf.host + this.src;
				utils.allinpayMethodList(host, {}).then((res) => {
					// console.log('用户协议', res);
					this.strings = res
				})
			},
			aggree() {
				// this.$emit('eventClose')
				this.$emit('eventAgree')
			}
		}
	}
</script>

<style lang="scss" scoped></style>